\(\int \cos (a+b x) \csc ^3(c+b x) \, dx\) [229]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 15, antiderivative size = 38 \[ \int \cos (a+b x) \csc ^3(c+b x) \, dx=-\frac {\cos (a-c) \csc ^2(c+b x)}{2 b}+\frac {\cot (c+b x) \sin (a-c)}{b} \]

[Out]

-1/2*cos(a-c)*csc(b*x+c)^2/b+cot(b*x+c)*sin(a-c)/b

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4677, 2686, 30, 3852, 8} \[ \int \cos (a+b x) \csc ^3(c+b x) \, dx=\frac {\sin (a-c) \cot (b x+c)}{b}-\frac {\cos (a-c) \csc ^2(b x+c)}{2 b} \]

[In]

Int[Cos[a + b*x]*Csc[c + b*x]^3,x]

[Out]

-1/2*(Cos[a - c]*Csc[c + b*x]^2)/b + (Cot[c + b*x]*Sin[a - c])/b

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 4677

Int[Cos[v_]*Csc[w_]^(n_.), x_Symbol] :> Dist[Cos[v - w], Int[Cot[w]*Csc[w]^(n - 1), x], x] - Dist[Sin[v - w],
Int[Csc[w]^(n - 1), x], x] /; GtQ[n, 0] && FreeQ[v - w, x] && NeQ[w, v]

Rubi steps \begin{align*} \text {integral}& = \cos (a-c) \int \cot (c+b x) \csc ^2(c+b x) \, dx-\sin (a-c) \int \csc ^2(c+b x) \, dx \\ & = -\frac {\cos (a-c) \text {Subst}(\int x \, dx,x,\csc (c+b x))}{b}+\frac {\sin (a-c) \text {Subst}(\int 1 \, dx,x,\cot (c+b x))}{b} \\ & = -\frac {\cos (a-c) \csc ^2(c+b x)}{2 b}+\frac {\cot (c+b x) \sin (a-c)}{b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.25 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.92 \[ \int \cos (a+b x) \csc ^3(c+b x) \, dx=-\frac {\csc (c) \csc ^2(c+b x) (\sin (a)-\cos (c+2 b x) \sin (a-c))}{2 b} \]

[In]

Integrate[Cos[a + b*x]*Csc[c + b*x]^3,x]

[Out]

-1/2*(Csc[c]*Csc[c + b*x]^2*(Sin[a] - Cos[c + 2*b*x]*Sin[a - c]))/b

Maple [A] (verified)

Time = 1.58 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.95

method result size
parallelrisch \(-\frac {\sec \left (\frac {x b}{2}+\frac {c}{2}\right )^{2} \csc \left (\frac {x b}{2}+\frac {c}{2}\right )^{2} \cos \left (2 x b +a +c \right )}{8 b}\) \(36\)
default \(-\frac {1}{2 b \left (\cos \left (a \right ) \cos \left (c \right )+\sin \left (a \right ) \sin \left (c \right )\right ) \left (\tan \left (x b +a \right ) \cos \left (a \right ) \cos \left (c \right )+\tan \left (x b +a \right ) \sin \left (a \right ) \sin \left (c \right )-\sin \left (a \right ) \cos \left (c \right )+\cos \left (a \right ) \sin \left (c \right )\right )^{2}}\) \(55\)
risch \(-\frac {-2 \,{\mathrm e}^{i \left (2 x b +5 a +c \right )}+{\mathrm e}^{i \left (5 a -c \right )}-{\mathrm e}^{i \left (3 a +c \right )}}{\left (-{\mathrm e}^{2 i \left (x b +a +c \right )}+{\mathrm e}^{2 i a}\right )^{2} b}\) \(64\)

[In]

int(cos(b*x+a)/sin(b*x+c)^3,x,method=_RETURNVERBOSE)

[Out]

-1/8/b*sec(1/2*x*b+1/2*c)^2*csc(1/2*x*b+1/2*c)^2*cos(2*b*x+a+c)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.18 \[ \int \cos (a+b x) \csc ^3(c+b x) \, dx=\frac {2 \, \cos \left (b x + c\right ) \sin \left (b x + c\right ) \sin \left (-a + c\right ) + \cos \left (-a + c\right )}{2 \, {\left (b \cos \left (b x + c\right )^{2} - b\right )}} \]

[In]

integrate(cos(b*x+a)/sin(b*x+c)^3,x, algorithm="fricas")

[Out]

1/2*(2*cos(b*x + c)*sin(b*x + c)*sin(-a + c) + cos(-a + c))/(b*cos(b*x + c)^2 - b)

Sympy [F(-1)]

Timed out. \[ \int \cos (a+b x) \csc ^3(c+b x) \, dx=\text {Timed out} \]

[In]

integrate(cos(b*x+a)/sin(b*x+c)**3,x)

[Out]

Timed out

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 395 vs. \(2 (36) = 72\).

Time = 0.23 (sec) , antiderivative size = 395, normalized size of antiderivative = 10.39 \[ \int \cos (a+b x) \csc ^3(c+b x) \, dx=\frac {{\left (2 \, \cos \left (2 \, b x + 2 \, a + 2 \, c\right ) - \cos \left (2 \, a\right ) + \cos \left (2 \, c\right )\right )} \cos \left (4 \, b x + a + 5 \, c\right ) - 2 \, {\left (2 \, \cos \left (2 \, b x + 2 \, a + 2 \, c\right ) - \cos \left (2 \, a\right ) + \cos \left (2 \, c\right )\right )} \cos \left (2 \, b x + a + 3 \, c\right ) - {\left (\cos \left (2 \, a\right ) - \cos \left (2 \, c\right )\right )} \cos \left (a + c\right ) + 2 \, \cos \left (2 \, b x + 2 \, a + 2 \, c\right ) \cos \left (a + c\right ) + {\left (2 \, \sin \left (2 \, b x + 2 \, a + 2 \, c\right ) - \sin \left (2 \, a\right ) + \sin \left (2 \, c\right )\right )} \sin \left (4 \, b x + a + 5 \, c\right ) - 2 \, {\left (2 \, \sin \left (2 \, b x + 2 \, a + 2 \, c\right ) - \sin \left (2 \, a\right ) + \sin \left (2 \, c\right )\right )} \sin \left (2 \, b x + a + 3 \, c\right ) - {\left (\sin \left (2 \, a\right ) - \sin \left (2 \, c\right )\right )} \sin \left (a + c\right ) + 2 \, \sin \left (2 \, b x + 2 \, a + 2 \, c\right ) \sin \left (a + c\right )}{b \cos \left (4 \, b x + a + 5 \, c\right )^{2} + 4 \, b \cos \left (2 \, b x + a + 3 \, c\right )^{2} - 4 \, b \cos \left (2 \, b x + a + 3 \, c\right ) \cos \left (a + c\right ) + b \cos \left (a + c\right )^{2} + b \sin \left (4 \, b x + a + 5 \, c\right )^{2} + 4 \, b \sin \left (2 \, b x + a + 3 \, c\right )^{2} - 4 \, b \sin \left (2 \, b x + a + 3 \, c\right ) \sin \left (a + c\right ) + b \sin \left (a + c\right )^{2} - 2 \, {\left (2 \, b \cos \left (2 \, b x + a + 3 \, c\right ) - b \cos \left (a + c\right )\right )} \cos \left (4 \, b x + a + 5 \, c\right ) - 2 \, {\left (2 \, b \sin \left (2 \, b x + a + 3 \, c\right ) - b \sin \left (a + c\right )\right )} \sin \left (4 \, b x + a + 5 \, c\right )} \]

[In]

integrate(cos(b*x+a)/sin(b*x+c)^3,x, algorithm="maxima")

[Out]

((2*cos(2*b*x + 2*a + 2*c) - cos(2*a) + cos(2*c))*cos(4*b*x + a + 5*c) - 2*(2*cos(2*b*x + 2*a + 2*c) - cos(2*a
) + cos(2*c))*cos(2*b*x + a + 3*c) - (cos(2*a) - cos(2*c))*cos(a + c) + 2*cos(2*b*x + 2*a + 2*c)*cos(a + c) +
(2*sin(2*b*x + 2*a + 2*c) - sin(2*a) + sin(2*c))*sin(4*b*x + a + 5*c) - 2*(2*sin(2*b*x + 2*a + 2*c) - sin(2*a)
 + sin(2*c))*sin(2*b*x + a + 3*c) - (sin(2*a) - sin(2*c))*sin(a + c) + 2*sin(2*b*x + 2*a + 2*c)*sin(a + c))/(b
*cos(4*b*x + a + 5*c)^2 + 4*b*cos(2*b*x + a + 3*c)^2 - 4*b*cos(2*b*x + a + 3*c)*cos(a + c) + b*cos(a + c)^2 +
b*sin(4*b*x + a + 5*c)^2 + 4*b*sin(2*b*x + a + 3*c)^2 - 4*b*sin(2*b*x + a + 3*c)*sin(a + c) + b*sin(a + c)^2 -
 2*(2*b*cos(2*b*x + a + 3*c) - b*cos(a + c))*cos(4*b*x + a + 5*c) - 2*(2*b*sin(2*b*x + a + 3*c) - b*sin(a + c)
)*sin(4*b*x + a + 5*c))

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 327 vs. \(2 (36) = 72\).

Time = 0.33 (sec) , antiderivative size = 327, normalized size of antiderivative = 8.61 \[ \int \cos (a+b x) \csc ^3(c+b x) \, dx=-\frac {\tan \left (\frac {1}{2} \, a\right )^{6} \tan \left (\frac {1}{2} \, c\right )^{6} + 3 \, \tan \left (\frac {1}{2} \, a\right )^{6} \tan \left (\frac {1}{2} \, c\right )^{4} + 3 \, \tan \left (\frac {1}{2} \, a\right )^{4} \tan \left (\frac {1}{2} \, c\right )^{6} + 3 \, \tan \left (\frac {1}{2} \, a\right )^{6} \tan \left (\frac {1}{2} \, c\right )^{2} + 9 \, \tan \left (\frac {1}{2} \, a\right )^{4} \tan \left (\frac {1}{2} \, c\right )^{4} + 3 \, \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{6} + \tan \left (\frac {1}{2} \, a\right )^{6} + 9 \, \tan \left (\frac {1}{2} \, a\right )^{4} \tan \left (\frac {1}{2} \, c\right )^{2} + 9 \, \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{4} + \tan \left (\frac {1}{2} \, c\right )^{6} + 3 \, \tan \left (\frac {1}{2} \, a\right )^{4} + 9 \, \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} + 3 \, \tan \left (\frac {1}{2} \, c\right )^{4} + 3 \, \tan \left (\frac {1}{2} \, a\right )^{2} + 3 \, \tan \left (\frac {1}{2} \, c\right )^{2} + 1}{2 \, {\left (\tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} - \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, a\right )^{2} + 4 \, \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right ) - 2 \, \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right ) - \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, c\right )^{2} + 2 \, \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right )^{2} + \tan \left (b x + a\right ) - 2 \, \tan \left (\frac {1}{2} \, a\right ) + 2 \, \tan \left (\frac {1}{2} \, c\right )\right )}^{2} {\left (\tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} - \tan \left (\frac {1}{2} \, a\right )^{2} + 4 \, \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right ) - \tan \left (\frac {1}{2} \, c\right )^{2} + 1\right )} b} \]

[In]

integrate(cos(b*x+a)/sin(b*x+c)^3,x, algorithm="giac")

[Out]

-1/2*(tan(1/2*a)^6*tan(1/2*c)^6 + 3*tan(1/2*a)^6*tan(1/2*c)^4 + 3*tan(1/2*a)^4*tan(1/2*c)^6 + 3*tan(1/2*a)^6*t
an(1/2*c)^2 + 9*tan(1/2*a)^4*tan(1/2*c)^4 + 3*tan(1/2*a)^2*tan(1/2*c)^6 + tan(1/2*a)^6 + 9*tan(1/2*a)^4*tan(1/
2*c)^2 + 9*tan(1/2*a)^2*tan(1/2*c)^4 + tan(1/2*c)^6 + 3*tan(1/2*a)^4 + 9*tan(1/2*a)^2*tan(1/2*c)^2 + 3*tan(1/2
*c)^4 + 3*tan(1/2*a)^2 + 3*tan(1/2*c)^2 + 1)/((tan(b*x + a)*tan(1/2*a)^2*tan(1/2*c)^2 - tan(b*x + a)*tan(1/2*a
)^2 + 4*tan(b*x + a)*tan(1/2*a)*tan(1/2*c) - 2*tan(1/2*a)^2*tan(1/2*c) - tan(b*x + a)*tan(1/2*c)^2 + 2*tan(1/2
*a)*tan(1/2*c)^2 + tan(b*x + a) - 2*tan(1/2*a) + 2*tan(1/2*c))^2*(tan(1/2*a)^2*tan(1/2*c)^2 - tan(1/2*a)^2 + 4
*tan(1/2*a)*tan(1/2*c) - tan(1/2*c)^2 + 1)*b)

Mupad [F(-1)]

Timed out. \[ \int \cos (a+b x) \csc ^3(c+b x) \, dx=\text {Hanged} \]

[In]

int(cos(a + b*x)/sin(c + b*x)^3,x)

[Out]

\text{Hanged}